import type {
  DeepPartial,
  SchedulingSaveOrUpdateShiftUnitParams,
  SchedulingSelectShiftUnitListParams,
  ShiftUnitList,
} from '@/types'

export const defaultFormData: Partial<
  SchedulingSaveOrUpdateShiftUnitParams['shiftUnit']
> = {
  name: '',
}

export function resetFormData(): DeepPartial<SchedulingSaveOrUpdateShiftUnitParams> {
  return {
    shiftUnit: { ...defaultFormData },
    shiftList: [],
  }
}
export const defaultUnitFormData: Partial<ShiftUnitList> = {
  endTime: '',
  name: '',
  overnightShift: 0,
  startTime: '',
  totalTimeMinute: 0,
}

export const formRules
  = generateCurrencyFormRules(defaultFormData)

export const defaultPagingParams: SchedulingSelectShiftUnitListParams
  = {
    name: '',
  }
